package view.steine;

import java.awt.BorderLayout;
import java.awt.Point;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URL;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;

import view.Master;
import view.menuelements.MenuButton;
import view.menuelements.MenuLabel;
import view.menuelements.Menupanel;
import model.menupages.Gamepage;

public class Standardblock {
	private Icon block;
	private Point pos;


	public Standardblock(String string) {
		super();
		URL ressource1 = ClassLoader.getSystemResource(string);
		this.block = new ImageIcon(ressource1);
	}

	public Icon getBlock() {
		return block;
	}

	public void draw(int x, int y, Gamepage gamepage) {
		int xkor =  x * 24;
		int ykor = gamepage.hg.getHeight() - y * 24;
		gamepage.steinAnzeigen(this, xkor, ykor);

	}

	public void remove(double x, double y, Gamepage gp) {
		double xkor =  x * 24;
		double ykor = gp.hg.getHeight() - y * 24;
		gp.steinVerschwinden(this, xkor, ykor);
	}

}
